/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * shoppingListPanel2.java
 *
 * Created on 2011-mar-02, 11:06:29
 */

package imat;

/**
 *
 * @author Boel_
 */
public class shoppingListPanel1 extends javax.swing.JPanel {

    private IMatPresenter presenter = IMatPresenter.getInstance();

    /** Creates new form shoppingListPanel2 */
    public shoppingListPanel1() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        shoppingList1 = new imat.shoppingList();
        viewEditShoppingList = new javax.swing.JButton();

        setName("Form"); // NOI18N

        shoppingList1.setName("shoppingList1"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(imat.IMatApp.class).getContext().getResourceMap(shoppingListPanel1.class);
        viewEditShoppingList.setText(resourceMap.getString("viewEditShoppingList.text")); // NOI18N
        viewEditShoppingList.setToolTipText(resourceMap.getString("viewEditShoppingList.toolTipText")); // NOI18N
        viewEditShoppingList.setName("viewEditShoppingList"); // NOI18N
        viewEditShoppingList.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                viewEditShoppingListActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(viewEditShoppingList, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
            .addComponent(shoppingList1, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addComponent(shoppingList1, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(viewEditShoppingList, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void viewEditShoppingListActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_viewEditShoppingListActionPerformed
        presenter.displayCategory(IMatView.LISTVIEW);
        //ShoppingListView.add();

    }//GEN-LAST:event_viewEditShoppingListActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private imat.shoppingList shoppingList1;
    private javax.swing.JButton viewEditShoppingList;
    // End of variables declaration//GEN-END:variables

}
